package com.semac.client.componentes.combo;

import com.google.gwt.event.shared.GwtEvent;

public class ComboValueChangedEvent extends GwtEvent<ComboValueChangeHandler> {
	public static Type<ComboValueChangeHandler> TYPE = new Type<ComboValueChangeHandler>();
	private String value = "";
	
	public ComboValueChangedEvent(String value) {
		this.value = value;
	}
	
	
	@Override
	public Type<ComboValueChangeHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(ComboValueChangeHandler handler) {
		handler.onChange(this);
	}


	public String getValue() {
		return value;
	}

	@Override
	public String toString() {
		return "selected item: " + this.getValue();
	}
}
